/* AI分析数据页面样式 */

/* 主容器样式 */
.ai-container {
  padding: 20px;
  height: calc(100vh - 110px); /* 减去顶部导航栏和面包屑的高度 */
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* 页面头部样式 */
.page-header {
  margin-bottom: 20px;
  flex-shrink: 0;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #303133;
}

.page-description {
  color: #606266;
  margin: 0;
}

/* 内容区域样式 */
.content-area {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* 统计卡片样式 */
.stats-section {
  margin-bottom: 24px;
  flex-shrink: 0;
}

.stats-card {
  position: relative;
  overflow: hidden;
}

.stats-content {
  position: relative;
  z-index: 2;
}

.stats-number {
  font-size: 28px;
  font-weight: bold;
  color: #303133;
  line-height: 1;
}

.stats-label {
  font-size: 14px;
  color: #606266;
  margin-top: 8px;
}

.stats-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  opacity: 0.1;
}

/* 搜索区域样式 */
.search-section {
  margin-bottom: 20px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

/* 确保选择器正常显示 */
.search-section .el-select {
  width: 100%;
}

.search-section .el-select .el-input__wrapper {
  background-color: #ffffff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
}

.search-section .el-select .el-input__inner {
  color: #606266;
}

.search-section .el-select .el-input__inner::placeholder {
  color: #c0c4cc;
}

/* 操作按钮区域样式 */
.action-section {
  margin-bottom: 20px;
  flex-shrink: 0;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-buttons .el-button {
  border-radius: 4px;
}

/* 表格区域样式 */
.table-section {
  margin-bottom: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 图片相关样式 */
.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 60px;
  overflow: hidden;
}

.table-image {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.table-image:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.image-error,
.no-image {
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f5f7fa;
  border: 1px dashed #dcdfe6;
  border-radius: 4px;
  font-size: 12px;
  color: #909399;
  flex-shrink: 0;
}

.image-error .el-icon,
.no-image .el-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.image-placeholder {
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f0f2f5;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  font-size: 12px;
  color: #606266;
  flex-shrink: 0;
}

.image-placeholder .el-icon {
  font-size: 16px;
  margin-bottom: 2px;
  color: #409eff;
}

/* 详情对话框样式 */
.detail-dialog {
  border-radius: 12px;
}

.detail-dialog :deep(.el-dialog) {
  max-width: 95vw;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.detail-dialog :deep(.el-dialog__header) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 24px;
  margin: 0;
}

.detail-dialog :deep(.el-dialog__title) {
  color: white;
  font-size: 20px;
  font-weight: 600;
}

.detail-dialog :deep(.el-dialog__headerbtn .el-dialog__close) {
  color: white;
  font-size: 20px;
}

.detail-dialog :deep(.el-dialog__body) {
  padding: 24px;
  background: #f8fafc;
  overflow-x: hidden;
  box-sizing: border-box;
}

.detail-content {
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* 头部信息卡片 */
.detail-header {
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.header-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.header-card :deep(.el-card__body) {
  padding: 24px;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

.header-left {
  flex-shrink: 0;
}

.user-avatar {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.avatar-image {
  width: 100%;
  height: 100%;
}

.avatar-error,
.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  color: #c0c4cc;
  font-size: 32px;
}

.header-right {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.analysis-title {
  margin: 0 0 16px 0;
  color: #1f2937;
  font-size: 24px;
  font-weight: 700;
  word-break: break-all;
  overflow-wrap: break-word;
}

.basic-tags {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.basic-tags .el-tag {
  margin: 0;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 20px;
  flex-shrink: 0;
}

.score-display {
  margin-top: 20px;
}

.score-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.score-progress {
  max-width: 300px;
}

/* 详细信息区域 */
.detail-body {
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.detail-body .el-row {
  width: 100%;
  margin: 0 !important;
}

.detail-body .el-col {
  padding: 0 12px;
  box-sizing: border-box;
}

.detail-body .el-col:first-child {
  padding-left: 0;
}

.detail-body .el-col:last-child {
  padding-right: 0;
}

.info-card {
  height: 100%;
  width: 100%;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.info-card:hover {
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #374151;
}

.header-icon {
  font-size: 18px;
  color: #667eea;
}

.info-card :deep(.el-card__header) {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
}

.info-card :deep(.el-card__body) {
  padding: 20px;
}

.analysis-content {
  text-align: center;
}

.score-detail {
  padding: 20px 0;
}

.score-number {
  font-size: 48px;
  font-weight: 700;
  color: #667eea;
  line-height: 1;
  margin-bottom: 8px;
}

.score-desc {
  font-size: 16px;
  color: #6b7280;
  font-weight: 500;
}

.features-list {
  text-align: left;
  padding-top: 16px;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-label {
  color: #6b7280;
  font-weight: 500;
}

.feature-value {
  color: #374151;
  font-weight: 600;
}

/* AI分析卡片 */
.detail-section {
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

.analysis-card {
  border-radius: 12px;
  transition: all 0.3s ease;
}

.analysis-card:hover {
  transform: translateY(-2px);
}

.analysis-card :deep(.el-card__header) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
}

.analysis-card :deep(.el-card__header) .card-header {
  color: white;
}

.analysis-card :deep(.el-card__header) .header-icon {
  color: white;
}

.ai-analysis-content {
  padding: 20px;
}

.analysis-text {
  line-height: 1.8;
  color: #374151;
  font-size: 15px;
  text-align: justify;
  padding-right: 12px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* AI分析文本格式化样式 - 用颜色区分标题等级 */

/* 强制重置所有标题的默认样式 */
.analysis-text h3, .analysis-text h4 {
  all: unset !important;
}

/* h3 一级标题需要独占一行 */
.analysis-text h3 {
  display: block !important;
}

/* h4 二级标题可以内联显示 */
.analysis-text h4 {
  display: inline-block !important;
}

/* 一级标题：仿照图片样式，蓝色标签带倾斜边缘 */
.detail-dialog .ai-analysis-content .analysis-text .analysis-main-title,
.detail-dialog .analysis-text h3.analysis-main-title,
.ai-analysis-content .analysis-text .analysis-main-title,
.analysis-text h3.analysis-main-title,
h3.analysis-main-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  margin: 20px 0 16px 0 !important;
  padding: 10px 20px 10px 16px !important;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%) !important;
  border-radius: 4px 0 0 4px !important;
  line-height: 1.4 !important;
  display: block !important;
  width: fit-content !important;
  position: relative !important;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2) !important;
}

/* 创建右侧倾斜边缘效果 */
.analysis-text h3.analysis-main-title::after,
h3.analysis-main-title::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  right: -12px !important;
  width: 0 !important;
  height: 0 !important;
  border-style: solid !important;
  border-width: 20px 0 20px 12px !important;
  border-color: transparent transparent transparent #40a9ff !important;
}

/* 二级标题：简洁样式，只保留紫色圆点 */
.detail-dialog .ai-analysis-content .analysis-text .analysis-sub-title,
.detail-dialog .analysis-text h4.analysis-sub-title,
.ai-analysis-content .analysis-text .analysis-sub-title,
.analysis-text h4.analysis-sub-title,
h4.analysis-sub-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #333333 !important;
  margin: 12px 0 8px 0 !important;
  padding: 0 0 0 20px !important;
  line-height: 1.5 !important;
  position: relative !important;
  display: inline-block !important;
  width: auto !important;
}

.ai-analysis-content .analysis-text .analysis-sub-title:before,
.analysis-text h4.analysis-sub-title:before {
  content: '•' !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #000000 !important;
  font-size: 14px !important;
  font-weight: bold !important;
}


.analysis-text .analysis-paragraph {
  margin: 8px 0 !important;
  line-height: 1.8 !important;
  color: #4b5563 !important;
  text-indent: 0 !important;
}

.analysis-text .analysis-bullet-point {
  margin: 6px 0 6px 16px !important;
  color: #6b7280 !important;
  line-height: 1.6 !important;
  position: relative !important;
}

.analysis-text .analysis-bullet-point:before {
  content: '' !important;
  position: absolute !important;
  left: -12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 4px !important;
  height: 4px !important;
  background-color: #667eea !important;
  border-radius: 50% !important;
}

/* 首个元素的上边距调整 */
.analysis-text .analysis-main-title:first-child,
.analysis-text .analysis-sub-title:first-child,
.analysis-text .analysis-paragraph:first-child {
  margin-top: 0 !important;
}

/* 最后一个元素的下边距调整 */
.analysis-text .analysis-main-title:last-child,
.analysis-text .analysis-sub-title:last-child,
.analysis-text .analysis-paragraph:last-child {
  margin-bottom: 0 !important;
}

/* 描述列表样式优化 */
.info-card :deep(.el-descriptions__label.desc-label) {
  font-weight: 600;
  color: #4b5563;
  width: 100px;
}

.info-card :deep(.el-descriptions__content) {
  font-weight: 500;
}

/* 滚动条样式 */
.detail-content :deep(.el-scrollbar__thumb) {
  background-color: rgba(144, 147, 153, 0.3);
  border-radius: 4px;
}

.detail-content :deep(.el-scrollbar__thumb:hover) {
  background-color: rgba(144, 147, 153, 0.5);
}

/* 图片预览相关样式 */
.ai-container :deep(.el-image-viewer__wrapper) {
  z-index: 9999 !important;
}

.ai-container :deep(.el-image-viewer__mask) {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

.ai-container :deep(.el-image-viewer__btn) {
  color: #fff !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
  border-radius: 50% !important;
}

.ai-container :deep(.el-image-viewer__btn:hover) {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

.ai-container :deep(.el-image-viewer__canvas) {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ai-container :deep(.el-image-viewer__img) {
  max-width: 90vw !important;
  max-height: 90vh !important;
  object-fit: contain !important;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 表格布局优化 */
.ai-container :deep(.el-table) {
  table-layout: fixed;
  flex: 1;
  height: 100% !important;
}

.ai-container :deep(.el-table td) {
  overflow: hidden;
}

.ai-container :deep(.el-table__body-wrapper) {
  overflow-y: auto !important;
}

/* 图片组件优化 */
.ai-container :deep(.el-image) {
  display: block;
  width: 100%;
  height: 100%;
}

/* 全局滚动条控制 */
html, body {
  overflow: hidden !important;
}

.ai-container :deep(.el-scrollbar__wrap) {
  overflow-x: hidden;
}

/* 滚动触发器样式（不可见） */
.scroll-trigger {
  pointer-events: none;
  user-select: none;
}